package sicnu.cs.ich.api.domain.form;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;
import java.io.Serializable;

/**
 * @author 沈洋 邮箱:1845973183@qq.com
 * @create 2021/12/7-19:13
 **/
@Data
@NoArgsConstructor
@AllArgsConstructor
public class RoleForm implements Serializable {
    private Integer roleId;
    @NotBlank
    @Pattern(regexp = "^ROLE_.*",message = "角色需要以ROLE_开头")
    private String role;
    @NotBlank
    @Size(max = 20)
    private String description;
    @NotEmpty(message = "权限不能为空")
    private Integer[] permissionId;
}
